// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from "vue";
import App from "./App";
import router from "./router";
import api from "./api/index";
// import url from './api/url'
import "babel-polyfill";
import { JudgeLogin } from "./api/login";
import store from "./store"; //仓库
import css from "swiper/dist/css/swiper.css";
import "./assets/css/normalize.css";
import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";

// Vue.prototype.IP = "http://47.110.243.129/"; //xqy
// Vue.prototype.tableList = "http://api.museum24h.com/myidea10/api/list/";
// Vue.prototype.zs = "http://47.99.59.109/zhoushan";
// Vue.prototype.loadown = "http://47.99.59.109/zsmanager"; //xiazai
// Vue.prototype.xqy = "http://121.196.126.210/"; //q
// Vue.prototype.book = "http://47.99.59.109/zhoushan1/"; //bookq

Vue.prototype.IP = "https://www.zsbwg.com/"; //xqy
Vue.prototype.tableList = "https://www.zsbwg.com/myidea10/api/list/";
Vue.prototype.zs = "https://www.zsbwg.com/zhoushanApi";

Vue.prototype.loadown = "https://www.zsbwg.com/zsmanager"; //xiazai
Vue.prototype.xqy = "https://www.zsbwg.com/"; //q
Vue.prototype.book = "https://www.zsbwg.com/zhoushan1/"; //bookq
Vue.prototype.$api = api;

Vue.config.productionTip = false;
Vue.use(ElementUI);
/* eslint-disable no-new */
Vue.directive("focus", {
  // 当被绑定的元素插入到 DOM 中时……
  inserted: function(el) {
    // 聚焦元素
    el.focus();
  }
});
router.afterEach((to, from, next) => {
  window.scrollTo(0, 0);
});

new Vue({
  el: "#app",
  //  i18n,  // 不要忘记
  router,
  store,
  components: { App },
  template: "<App/>"
});
